/**
 * 
 */
package tk.sunlatus.project.config.xml;

import org.apache.log4j.Logger;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;

/**
 * @author sunlotus
 * 
 */
public class ConfigInfoParser extends DefaultHandler {
    private static final Logger LOGGER = Logger.getLogger(ConfigInfoParser.class);

    @Override
    public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
        // TODO Auto-generated method stub

        LOGGER.debug("uri=" + uri);
        LOGGER.debug("localName=" + localName);
        LOGGER.debug("qName=" + qName);
        if (attributes != null) {
            LOGGER.debug("\nparse attr begin.....");
            for (int i = 0; i < attributes.getLength(); i++) {
                LOGGER.debug(attributes.getQName(i) + "=" + attributes.getValue(i));
            }
            LOGGER.debug("\nparse attr end.....");
        } else {
            LOGGER.debug("attr is null");
        }
        super.startElement(uri, localName, qName, attributes);
    }

}
